package com.company.project.common.job.task;

import com.company.project.entity.THwtjEntity;
import com.company.project.mapper.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

/**
 * 通话明细/通话日报/话务统计 定时更新当天数据
 * testTask为spring bean的名称， 方法名称必须是run
 *
 * @author wenbin
 * @version V1.0
 * @date 2020年3月18日
 */
@Component("thmxtjrbTask")
public class ThmxtjrbTask {
	private Logger logger = LoggerFactory.getLogger(getClass());
	@Autowired
	public TThrbMapper thrbMapper;
	@Autowired
	private THwtjMapper hwtjMapper;
	@Autowired
	private TThjlmxMapper thjlmxMapper;
	@Resource
	public TCallbakTaskMapper tCallbakTaskMapper;
	public void run(String params){
		logger.debug("thmxtjrbTask定时任务正在执行--------开始");

		Date calltime = new Date();//呼叫时间
		//话务统计总计处理
		tCallbakTaskMapper.deleteHJ(calltime);
		tCallbakTaskMapper.insertHJ(calltime);
		logger.debug("thmxtjrbTask定时任务执行--------结束");
	}
}
